home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software 2000
/
Software 2000 Volume 1 (Disc 1 of 2).iso
/
utilities
/
u286.dms
/
u286.adf
/
ARP
/
ARPManual
/
Ask
< prev
next >
Wrap
Text File
|
1991-07-28
|
2KB
|
67 lines
Ask(REL2) ARP User's Manual Ask(REL2)
NAME
Ask - Query user interactively.
SYNOPSIS
Ask Prompt WARN OK TIMEOUT
DESCRIPTION
Ask is a program that allows you to get a simple form of
input from a user. It is most useful in Execute scripts.
You may specify a Prompt string, which will be displayed to
the user, and you may also specify a string to match on for
both YES and NO responses, as well as specifying a time
limit on the users response in seconds. All of these
strings are have default values, the default for the WARN
string is 'Y', the default for the OK string is 'N', and the
default for the Prompt is a single question mark.
If the user enters a string which matches the WARN string,
ask will exit with a return code that will cause a IF WARN
statement to succeed. If the user enters a string which
matches the OK string, exceeds the value given in TIMEOUT,
or simply hits RETURN then Ask will exit with a ZERO return,
suitable for the ELSE portion of such an IF statement.
If the user enters a string other than those specified in
WARN and OK, then ASK will redisplay the prompt, urging the
user to give a better answer.
EXAMPLE
Here is an example of a Ask command which will return a
WARNING if the User types "Amiga", and an OK if the user
types BigBlue, or waits longer than 10 seconds to respond:
Ask "Amiga or BigBlue?" "Amiga" "BigBlue" Timeout 10
IF WARN ; typed amiga!
Echo "Obviously a person of quality"
ELSE ; typed big blue? or couldn't decide
Echo "You are obviously misguided"
ENDIF
Page 1 (printed 2/22/88)